package com.zh.jwt.common.exception;

import com.zh.jwt.common.enums.BizEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * Token异常
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class UnauthorizedException extends RuntimeException {
    private BizEnum bizEnum;

    public UnauthorizedException(BizEnum bizEnum) {
        super(bizEnum.getMessage());
        this.bizEnum = bizEnum;
    }
}